<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <!-- 图片上传样式 -->
    <link rel="stylesheet" href="static/ace/css/indexfile.css"/>
    <!-- 下拉框 -->
    <link rel="stylesheet" href="static/ace/css/chosen.css" />
    <!-- jsp文件头和头部 -->
    <%@ include file="../../system/index/top.jsp"%>
</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <form action="${actionUrl}" name="form" id="form" method="post" enctype="multipart/form-data">
                            <input type="hidden" name="id" id="id" value="${bannerConf.id}"/>
                            <div id="zhongxin" style="padding-top: 13px;">
                                <table id="table_report" class="table table-striped table-bordered table-hover">
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>banner图片：</td>
                                        <td style="width:80%;">
                                            <div>
                                                <section class=" img-section" style="margin-left: 21px;">
                                                    <div class="z_photo upimg-div clear" id="z_photo-one">
                                                        <section class="z_file fl">
                                                            <c:if test="${not empty bannerConf.imageUrl }">
                                                                <img src="${bannerConf.imageUrl }" class="add-img">
                                                            </c:if>
                                                            <c:if test="${empty bannerConf.imageUrl }">
                                                                <img src="static/images/sctp.png" class="add-img">
                                                            </c:if>
                                                            <input type="file" id="pictureAddressOne" name="pictureAddressOne" class="file" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple />
                                                        </section>
                                                    </div>
                                                </section>
                                            </div>
                                            <aside class="mask works-mask" id="works-mask-one">
                                                <div class="mask-content">
                                                    <p class="del-p">您确定要删除该图片吗？</p>
                                                    <p class="check-p"><span class="del-com wsdel-ok" id="wsdel-ok-one">确定</span><span class="wsdel-no" id="wsdel-no-one">取消</span></p>
                                                </div>
                                            </aside>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>banner名称：</td>
                                        <td style="width:80%;"><input type="text" name="bannerName" id="bannerName" value="${bannerConf.bannerName}" title="banner名称" placeholder="这里输入banner名称" style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>使用日期：</td>
                                        <td style="width:80%;">
                                            <input id="startDate" name="startTimeStr" value="${bannerConf.startTimeFormat}" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,maxDate:'#F{$dp.$D(\'endDate\')}'})" placeholder="请选择开始时间"/>
                                            ~
                                            <input id="endDate" name="endTimeStr" value="${bannerConf.endTimeFormat}" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,minDate:'#F{$dp.$D(\'startDate\')}',startDate:'#F{$dp.$D(\'startDate\',{d:+1})}'})" placeholder="请选择结束时间"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;">跳转类型：</td>
                                        <td style="width:80%;" id="jumpTypeCodeSelect">
                                            <select class="chosen-select form-control" name="jumpTypeCode" id="jumpTypeCode" data-placeholder="这里选择跳转类型" style="width:120px;">
                                                <option value="" <c:if test="${empty bannerConf.jumpTypeCode}">selected</c:if>></option>
                                                <c:forEach items="${bannerJumpTypeDictList}" var="bannerJumpTypeDict" >
                                                    <option value="${bannerJumpTypeDict.jumpTypeCode}" <c:if test="${bannerJumpTypeDict.jumpTypeCode eq bannerConf.jumpTypeCode}">selected</c:if>>${bannerJumpTypeDict.jumpTypeName}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;">跳转内容：</td>
                                        <td style="width:80%;"><input type="text" name="jumpInfo" id="jumpInfo" value="${bannerConf.jumpInfo}" title="跳转内容" placeholder="这里输入跳转内容（可以是地址或文章id或圈子id或达人id等）" style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>所属模块：</td>
                                        <td style="width:80%;" id="menuCodeSelect">
                                            <select class="chosen-select form-control" name="menuCode" id="menuCode" data-placeholder="这里选择所属模块" style="width:120px;">
                                                <option value="" <c:if test="${empty bannerConf.menuCode}">selected</c:if>></option>
                                                <c:forEach items="${menuLevelConfigList}" var="menuLevelConfig" >
                                                    <option value="${menuLevelConfig.menuCode}" <c:if test="${menuLevelConfig.menuCode eq bannerConf.menuCode}">selected</c:if>>${menuLevelConfig.menuName}</option>
                                                </c:forEach>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;"><font color="red">*</font>排序：</td>
                                        <td style="width:80%;"><input type="text" name="sort" id="sort" value="${bannerConf.sort}" placeholder="这里输入排序" title="排序" style="width:98%;"/></td>
                                    </tr>
                                    <tr>
                                        <td style="width:20%;text-align: right;padding-top: 13px;">备注：</td>
                                        <td><textarea id="remark" name="remark" maxlength="500" title="备注" placeholder="这里输入备注" style="height: 200px; width: 800px;">${bannerConf.remark}</textarea></td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: center;" colspan="10">
                                            <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
                                            <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green"></h4></div>
                        </form>
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.page-content -->
        </div>
    </div>
    <!-- /.main-content -->
</div>
<!-- /.main-container -->
<!-- basic scripts -->
<!-- 页面底部js¨ -->
<%@ include file="../../system/index/foot.jsp"%>
<!-- ace scripts -->
<script src="static/ace/js/ace/ace.js"></script>
<!-- inline scripts related to this page -->
<!-- 模态框 -->
<script src="static/ace/js/bootbox.js"></script>
<!-- 下拉框 -->
<script src="static/ace/js/chosen.jquery.js"></script>
<!-- 日期框 -->
<script type="text/javascript" src="<%=basePath%>plugins/My97DatePicker_new/WdatePicker.js"></script>
<!--参数校验-->
<script type="text/javascript" src="static/js/public/validate.js"></script>
<!-- 提示框 -->
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
<!-- 本业务js -->
<script type="text/javascript" src="static/js/admin/banner/bannerConf/edit.js"></script>
</body>
<script type="text/javascript">
    $(top.hangge());
    var actionUrl = '${actionUrl}';
    var path = "${pageContext.request.contextPath}";
</script>
</html>
